{% extends 'dashboards/base_dashboard.html' %} {% load custom_filters %} {% block extra_css %} {% endblock %} {% block stats %}

Welcome back, {{ request.user.get_full_name|default:request.user.username }}!

Here's what's happening in {{ ministry.name|default:'your ministry' }} today

Create Task {% if request.user.role.name == 'minister' %} {% endif %}
Total Tasks

{{ total_tasks }}

{% widthratio completed_tasks total_tasks 100 %}% completed

Completed

{{ completed_tasks }}

{% widthratio completed_tasks total_tasks 100 %}%

{{ in_progress_tasks }} in progress

In Progress

{{ pending_tasks }}

{{ high_priority_tasks|length }} high
{% widthratio pending_tasks total_tasks 100 %}%

{{ pending_tasks }} tasks pending

Departments

{{ total_departments }}

Total
100%

{{ departments.count }} total departments

{% endblock %} {% block left_column %}
Recent Tasks in {{ ministry.name }}
View All
{% for task in recent_tasks %} {% empty %} {% endfor %}
Title Department Assigned To Priority Status Due Date Actions
{{ task.title|truncatechars:30 }} {{ task.assigned_to.department.name|default:"-" }} {{ task.assigned_to.get_full_name|default:task.assigned_to.email }} {{ task.get_priority_display }} {{ task.get_status_display }} {{ task.due_date|date:"M d, Y"|default:"-" }}
No tasks found
Director Generals
Add DG
{% for dg in director_generals %} {% empty %} {% endfor %}
Name Email Department Active Tasks Status Actions
{{ dg.get_full_name|default:dg.username }} {{ dg.email }} {{ dg.department.name|default:"-" }} {{ dg.assigned_tasks.count }} tasks {{ dg.is_active|yesno:"Active,Inactive" }}
No Director Generals found
Departments
Add Department
{% for dept in department_stats %} {% empty %} {% endfor %}
Department Director General Members Tasks Completion Status Actions
{{ dept.name }}
{{ dept.description|default:''|truncatechars:40 }}
{{ dept.director_general.get_full_name|default:"-" }} {{ dept.member_count|default:0 }}
{{ dept.completed_tasks|default:0 }} / {{ dept.total_tasks|default:0 }}
{% widthratio dept.completed_tasks dept.total_tasks 100 %}% {{ dept.is_active|yesno:"Active,Inactive" }}
No departments found
Task Status Distribution
Pending Completed In Progress
Department Performance
{% for dept in department_stats|slice:":5" %}

{{ dept.name }} {% widthratio dept.completed_tasks dept.total_tasks 100 %}%

{% endfor %}
{% endblock %} {% block extra_js %} {% endblock %}